package app.r_teenus.backend.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "INVOICE_ROW")
public class InvoiceRow implements Serializable {

	private static final long serialVersionUID = -5843683718414516144L;
	private Integer id = null;
	private Invoice invoice = null;
	private String description = null;
	private Double price = null;
	private Double unitPrice = null;
	private Double amount = null;
	private String unitType = null;
	private Integer invoiceRowType = null;

	/**
	 * Gets id (primary key).
	 */
	@Id
	@Column(name = "invoice_row")
	@SequenceGenerator(name = "invoice_row_id", sequenceName = "invoice_row_id", allocationSize = 1)
	@GeneratedValue(generator = "invoice_row_id")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@OneToOne
	@JoinColumn(name = "INVOICE_FK", nullable = false)
	public Invoice getInvoice() {
		return invoice;
	}

	public void setInvoice(Invoice invoice) {
		this.invoice = invoice;
	}

	@Column(name = "action_part_description")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	@Column(name = "price_total")
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}
	@Column(name = "unit_price")
	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}
	@Column(name = "unit_type")
	public String getUnitType() {
		return unitType;
	}

	public void setUnitType(String unitType) {
		this.unitType = unitType;
	}
	@Column(name = "invoice_row_type")
	public Integer getInvoiceRowType() {
		return invoiceRowType;
	}

	public void setInvoiceRowType(Integer invoiceRowType) {
		this.invoiceRowType = invoiceRowType;
	}

}
